package com.jluzh10.learning.web.controller;

import com.jluzh10.learning.domain.CourseGroup;
import com.jluzh10.learning.domain.PictureCarousel;
import com.jluzh10.learning.service.CourseGroupService;
import com.jluzh10.learning.service.PictureCarouselService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;

/**
 * @author yzg
 * @create 2019/5/20
 *
 * 首页访问控制器
 */
@Controller
@RequestMapping("")
public class URLController {

    private final CourseGroupService groupService;

    @Autowired
    public URLController(CourseGroupService groupService) {
        this.groupService = groupService;
    }

    /**
     * 访问首页
     * @return
     */
    @RequestMapping(value = "",method = RequestMethod.GET)
    public ModelAndView index(ModelAndView modelAndView) throws Exception {
        modelAndView.addObject("page","index");

        modelAndView.setViewName("index");
        return modelAndView;
    }
}
